<!-- 获奖课程维护 -->
<template>
  <div class="assessment-container">
    <div class="search-container">
      <div class="search-container-left" style="display: flex">
        <div class="search-container-item">
          <span>课程名称：</span>
          <el-input
            size="mini"
            style="width: 100px"
            placeholder=""
            v-model="courseName"
          ></el-input>
        </div>
        <div class="search-container-item">
          <span>获奖名称：</span>
          <el-input
            size="mini"
            style="width: 100px"
            placeholder=""
            v-model="hjmc"
          ></el-input>
        </div>
        <div class="search-container-item">
          <span>获奖年份：</span>
          <el-date-picker
            size="mini"
            v-model="hjnf"
            value-format="yyyy"
            type="year"
            placeholder="选择日期"
          >
          </el-date-picker>
        </div>
        <!-- <div @click="checkList">
          <el-button icon="el-icon-search" type="primary" size="mini"
            >查询</el-button
          >
        </div>
        <div>
          <el-button
            type="warning"
            icon="el-icon-plus"
            size="mini"
            style="margin-left:20px"
            @click="addAwardCourse"
            >添加获奖课程</el-button
          >
        </div> -->
        <div class="search-button" @click="checkList" style="margin: 3px 15px 0 15px;">
          <img src="@/assets/assessment/icon-search.png" alt="" />
          <span>查询</span>
        </div>
        <div
          class="cjrc-button"
          @click="addAwardCourse"
          style="width: 180px; margin: 3px 15px 0 0;font-size:16px;line-height: 28px;"
        >
          <img src="@/assets/assessment/iconaddd.png" alt="" />
          <span>添加获奖课程</span>
        </div>
        <!-- <div style="padding-left:20px">
          <el-button
            type="warning"
            icon="el-icon-delete"
            size="mini"
            @click="removeAll"
            >批量删除</el-button
          >
        </div> -->
        <div
          class="plsc-button"
          @click="deleteOk"
          style="width: 120px; margin: 3px 15px 0 0;"
        >
          <img src="../../../assets/assessment/删除.png" alt="" />
          <span>批量删除</span>
        </div>
      </div>
      <div class="search-container-right">
      </div>
    </div>
    <div class="plan-entry-table-container">
      <el-table
        :data="tableData"
        style="width: 100%"
        class="xpaas-table-class"
        row-class-name="xpaas-row-class"
        cell-class-name="xpaas-cell-class"
        header-row-class-name="xpaas-header-row-class"
        header-cell-class-name="xpaas-header-cell-class"
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55" label="选择">
        </el-table-column>
        <el-table-column label="课程编号【课程名称】" align="center">
          <template slot-scope="{ row, $index }">
            {{ row.courseCode }} [ {{ row.courseName }} ]
          </template>
        </el-table-column>
        <el-table-column prop="eduLevel" label="适应对象" align="center">
        </el-table-column>
        <el-table-column prop="practiceHours" label="学时" align="center">
        </el-table-column>
        <el-table-column prop="courseCharger" label="主要负责人" align="center">
        </el-table-column>
        <el-table-column prop="hjmc" label="获奖名称" align="center">
        </el-table-column>
        <el-table-column prop="hjdj" label="获奖等级" align="center">
        </el-table-column>
        <el-table-column prop="hjnf" label="获奖年份" align="center">
        </el-table-column>
        <el-table-column
          prop="cz"
          label="操作"
          align="center"
          class-name=""
          label-class-name=""
        >
          <template slot-scope="{ row, $index }">
            <div class="bk-lucj-import-button" @click="editCourse(row.id)">
              <img
                src="../../../assets/assessment/icon-plan-record-detail.png"
                alt=""
              />
              编辑
            </div>
            <div class="de-lucj-import-button" @click="deleteCourse(row.id)">
              <img
                src="../../../assets/assessment/icon-delete.png"
                alt=""
                style="width:13px;height:13px"
              />
              删除
            </div>
            <!-- <el-button
              type="success"
              icon="el-icon-edit"
              size="mini"
              @click="editCourse(row.id)"
              >编辑</el-button
            >
            <el-button
              type="danger"
              icon="el-icon-delete"
              size="mini"
              @click="deleteCourse(row.id)"
              >删除</el-button
            > -->
          </template>
        </el-table-column>
      </el-table>
    </div>
    <div style="padding-top:15px;display:flex;    justify-content: space-between;">
      <!-- <div>
        <download-excel
          :data="tableData"
          :fields="jsonFields"
          type="xls"
          name="课程类型维护.xls"
        >
          <el-button icon="el-icon-download" type="warning" size="mini"
            >导出Excel</el-button
          >
        </download-excel>
      </div> -->
      <div class="export-button" style="width: 130px;
        background: #fff6ef;
        border: 1px solid #f3b815;
        height: 28px;
        line-height: 28px;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;">
        <img src="../../../assets/assessment/icon-export.png" style="width: 16px; height: 16px; margin-right: 5px;" alt=""/>
        <download-excel
          class="export-btn"
          :data="tableData"
          :fields="jsonFields"
          type="xls"
          name="课程类型维护.xls"
          style="color: #f3b815;cursor: pointer"
        >
          &ensp;导出Excel
        </download-excel>
      </div>
      <div class="block">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="pageNo"
          :page-sizes="[10, 20, 30]"
          :page-size="100"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
        >
        </el-pagination>
      </div>
    </div>

    <el-dialog
      :title="title"
      :visible.sync="dialogVisibleAdd"
      class="manual-entry-container"
      width="1185px"
    >
      <div>
        <el-row>
          <el-col :span="12">
            <div style="background: rgba(77, 129, 192, 0.1)">
              课程编号【获奖课程】
              <span style="color:red">*</span>
            </div>
          </el-col>
          <el-col :span="10">
            <el-input
              placeholder="请选择"
              disabled="true"
              v-model.number="addCourseList.kcbh"
            ></el-input>
          </el-col>
          <el-col :span="2">
            <div
              class="cjrc-button"
              @click="addCourseSet"
              style="width: 80px;height:28px;position: relative;top: 35px;right: 50px;"
            >
              <img src="@/assets/assessment/iconaddd.png" alt="" />
              <span>选择</span>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div style="background: rgba(77, 129, 192, 0.1)">获奖名称<span style="color:red">*</span></div>
          </el-col>
          <el-col :span="10">
            <el-input
              placeholder="请输入获奖名称"
              v-model="addCourseList.hjmc"
            ></el-input>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div style="background: rgba(77, 129, 192, 0.1)">获奖等级<span style="color:red">*</span></div>
          </el-col>
          <el-col :span="10">
            <el-input
              placeholder="请输入获奖等级"
              v-model="addCourseList.hjdj"
            ></el-input>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <div style="background: rgba(77, 129, 192, 0.1)">获奖年份<span style="color:red">*</span></div>
          </el-col>
          <el-col :span="10">
            <el-date-picker
              v-model="addCourseList.hjnf"
              value-format="yyyy"
              type="year"
              placeholder="请选择获奖年份"
            >
            </el-date-picker>
          </el-col>
        </el-row>
      </div>
      <div class="button-group" style="border:none;cursor: pointer;
        margin-top: 30px;
        text-align: center;
        ">
        <div @click="save" style="
          color: #f3b815;
          border: 1px solid #f3b815;
          background: #fff6ef;
          margin-right: 139px;">
          <div>保 存</div>
        </div>
        <div @click="dialogVisibleAdd = false" style="
        color: #ff3819;
          border: 1px solid #ff3819;
          background: #ffefef;">
          <div>取 消</div>
        </div>
      </div>
      <!-- <span slot="footer">
         <el-button type="success"  @click="save">保 存</el-button>
         <el-button style="margin-left:60px" type="danger" @click="dialogVisibleAdd = false">取 消</el-button>
      </span> -->
    </el-dialog>
    <el-dialog
      title="课程设置"
      :visible.sync="showDialogVisible"
      class="courseSetDialog"
      width="1400px"
    >
      <div style="width: 100%;height:400px;position:relative;border:none">
        <el-tree
          :data="treeData"
          :props="defaultProps"
          default-expand-all="true"
          :filter-node-method="filterNode"
          @node-click="handleNodeClick"
          ref="tree"
          style="color:#004ca7;position: absolute;top: 2%;left:30px;background: none"
        ></el-tree>
        <!-- <div style="width:2px;border:1px solid #004ca7;margin:0px 20px"></div> -->
        <span style="display:block;width: 82%;position: absolute;top: 2%;right:20px">
          <div class="search-container-item" style="color: #004ca7;display: inline-flex;">
            <span style="line-height: 28px;">课程名称：</span>
            <el-input
              :style="roleId === '1490859421955674114' ? 'width: 82px' : 'width: 120px'"
              size="mini"
              clearable
              v-model="courseNameSea"
              placeholder="请输入内容"
            ></el-input>
          </div>
          <div class="search-container-item" style="color: #004ca7;display: inline-flex;margin-left:20px">
            <span style="line-height: 28px;">课程编号：</span>
            <el-input
              :style="roleId === '1490859421955674114' ? 'width: 82px' : 'width: 120px'"
              size="mini"
              clearable
              v-model="courseNumberSea"
              placeholder="请输入内容"
            ></el-input>
          </div>
          <div class="search-button" style="display: inline-flex;margin-left:20px" @click="reqCheckSearch">
            <img src="../../../assets/assessment/icon-search.png" alt=""/>
            <span>查询</span>
          </div>
          <el-table
            :data="treeTableData"
            style="margin: 15px 0 50px 0;"
            class="xpaas-table-class"
            row-class-name="xpaas-row-class"
            cell-class-name="xpaas-cell-class"
            header-row-class-name="xpaas-header-row-class"
            header-cell-class-name="xpaas-header-cell-class"
            highlight-current-row
            ><el-table-column label="选择" width="55">
              <template slot-scope="{ row, $index }">
                <el-checkbox
                  v-model="row.checked"
                  @change="selectOneRow(row)"
                ></el-checkbox>
              </template>
            </el-table-column>
            <el-table-column prop="courseCode" label="课程编号" align="center">
            </el-table-column>
            <el-table-column prop="courseName" label="课程名称" align="center">
            </el-table-column>
            <el-table-column prop="courseSimpleName" label="简称" align="center">
            </el-table-column>
            <el-table-column prop="credit" label="学分" align="center">
            </el-table-column>
            <el-table-column prop="totalHours" label="总学时" align="center">
            </el-table-column>
            <el-table-column prop="levelname" label="适用培养层次" align="center">
            </el-table-column>
            <el-table-column prop="mainSubject" label="是否主干课" align="center">
            </el-table-column>
            <el-table-column prop="remark" label="备注" align="center">
            </el-table-column>
          </el-table>
        </span>
        <div class="block" style="position: absolute;bottom: -10px;right: 20px;margin-top:15px">
          <el-pagination style="width:auto;padding:0"
                        @size-change="handleSizeChangeD"
                        @current-change="handleCurrentChangeD"
                        :current-page="pageNo"
                        :page-sizes="[3]"
                        :page-size="pageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="total">
          </el-pagination>
        </div>
      </div>
      <div class="button-group" style="border:none;cursor: pointer;
        margin-top: 30px;
        text-align: center;
        ">
        <div @click="saveTreeTableDataId" style="
          color: #f3b815;
          border: 1px solid #f3b815;
          background: #fff6ef;
          margin-right: 139px;">
          <div>保 存</div>
        </div>
        <div @click="showDialogVisible = false" style="
        color: #ff3819;
          border: 1px solid #ff3819;
          background: #ffefef;">
          <div>取 消</div>
        </div>
      </div>
      <!-- <span slot="footer">
         <el-button style="margin-right:10px" type="success" size="mini"  @click="saveTreeTableDataId" >保 存</el-button>

         <el-button style="margin-left:30px" type="danger" size="mini" @click="showDialogVisible = false">取 消</el-button>
      </span> -->
    </el-dialog>
  </div>
</template>

<script>
import { reqCheckBottomData } from '@/api/course/courses'
import {
  reqAwardCourseList,
  reqAddAwardList,
  reqDeleteCourse,
  reqgetTree,
  reqGetTreeTableDatas,
  reqGetEditData,
  reqUpdateData
} from "@/api/course/courses.js";
export default {
  data() {
    return {
      courseNumberSea:'',
      courseNameSea:'',
      parentId: "0",
      tableData: [],
      pageNo: 1,
      pageSize: 3,
      total: 0,
      courseName: "",
      hjmc: "",
      hjnf: "",
      dialogVisibleAdd: false, // 添加获奖课程弹窗显示隐藏
      addCourseList: {
        kcid: "",
        kcbh: "",
        hjmc: "",
        hjdj: "",
        hjnf: ""
      },
      showDialogVisible: false, // 课程设置弹窗显示隐藏
      treeData: [],
      defaultProps: {

      },
      bx: "",
      teachingClassName: "",
      treeParentName: "",
      treeChildrenName: "",
      treeTableData: [], // 课程设置表数据
      removeAllIds: "",

      title: "添加获奖课程",
      jsonFields: {
        课程编号: "courseCode",
        课程名称: "courseName",
        适应对象: "eduLevel",
        学士: "practiceHours",
        主要负责人: "courseCharger",
        获奖名称: "hjmc",
        获奖等级: "hjdj",
        获奖年份: "hjnf"
      }
    };
  },
  created() {
    this.getAwardCoursesList();
    this.getTreeList();
  },
  methods: {
    // 初始化表格数据
    async getAwardCoursesList() {
      const result = await reqAwardCourseList(
        this.pageNo,
        this.pageSize,
        this.courseName,
        this.hjmc,
        this.hjnf
      );
      if (result.data.code == 200) {
        this.tableData = result.data.data;
        this.total = result.data.data.length > 0 ? result.data.data[0].tol : '';
      }
    },
    // 查询点击事件
    checkList() {
      this.getAwardCoursesList();
    },
    // 点击添加获奖课程
    addAwardCourse() {
      this.dialogVisibleAdd = true;
      this.title = "添加获奖课程";
      Object.assign(
        this._data.addCourseList,
        this.$options.data().addCourseList
      );
    },
    // 添加获奖课程的---保存点击事件
    async save() {
      if(this.addCourseList.kcbh == '' || this.addCourseList.hjmc == '' || this.addCourseList.hjdj == '' || this.addCourseList.hjnf == '' ){
        this.$message({ type: "error", message: "必填项不能为空!" });
        return
      }
      let result = null;
      if (this.addCourseList.id) {
        result = await reqUpdateData(this.addCourseList);
      } else {
        result = await reqAddAwardList(this.addCourseList);
      }

      if (result.data.code == 200) {
        this.$message({ type: "success", message: "保存成功" });
        this.dialogVisibleAdd = false;
        Object.assign(
          this._data.addCourseList,
          this.$options.data().addCourseList
        );
        this.getAwardCoursesList();
      }
    },
    handleCurrentChange(val) {
      this.pageNo = val;
      this.getAwardCoursesList();
    },
    handleSizeChange(val) {
      this.pageSize = val;
      this.getAwardCoursesList();
    },
    handleCurrentChangeD(val) {
      this.pageNo = val;
      this.getTreeData();
    },
    handleSizeChangeD(val) {
      this.pageSize = val;
      this.getTreeData();
    },
    // 点击编辑按钮
    async editCourse(id) {
      this.title = "编辑获奖课程";
      this.dialogVisibleAdd = true;
      const result = await reqGetEditData(id);
      if (result.data.code == 200) {
        this.addCourseList = result.data.data;
      }
    },
    // 删除点击事件
    async deleteCourse(ids) {
      const result = await reqDeleteCourse(ids);
      this.$confirm('确认要删除吗？')
        .then(_ => {
          if (result.data.code == 200) {

            if (this.tableData.length == 1) {
              this.$message.success("删除成功！")
              this.getAwardCoursesList(
                (this.pageNo =
                  this.tableData.length > 1 ? this.pageNo - 1 : this.pageNo)
              );
            } else {
              this.$message({ type: "error", message: res.data.data, duration:5000 });
              this.getAwardCoursesList(
                (this.pageNo =
                  this.tableData.length > 1 ? this.pageNo : this.pageNo - 1)
              );
            }
          }
        })
    },
    // 点击加号
    addCourseSet() {
      this.showDialogVisible = true;
      this.getTreeList();
    },
    //获取树的数据
    async getTreeList() {
      const result = await reqgetTree(this.parentId);
      if (result.data.code == 200) {
        let arrs = result.data.data.filter(item=>{
          return item.deptCategory == 5
        })
        this.treeData = arrs
      }
      this.treeData.forEach((item) => {
        item.label = item.deptName
      })
    },
    //课程设置查询
    reqCheckSearch(){
      console.log(this.courseNumberSea)
      console.log(this.courseNameSea)
      if(this.courseNumberSea == '' && this.courseNameSea == ''){
        this.pageNo = 1;
        this.getTreeData();
        return
      } else {
        reqCheckBottomData(this.pageNo,this.pageSize,'',this.courseNumberSea,this.courseNameSea).then(res=>{
          if(res.data.code == 200){
            this.treeTableData = res.data.data;
            this.total = res.data.data.length > 0 ? res.data.data[0].tol : 0
          }
        })
      }
    },

    async handleNodeClick(val, valNode) {
      this.courseNumberSea = '';
      this.courseNameSea = '';
      const result = await reqgetTree(val.id);
      if (result.data.code == 200) {
        this.$set(val, "children", result.data.data);
      }
      val.children.forEach(item => {
        item.label = item.deptName;
      });
      this.treeChildrenName = val.id;
      this.treeParentName = valNode.parent.data.id;
      if (this.treeChildrenName && this.treeParentName) {
        this.pageNo = 1
        this.getTreeData();
      }
    },
    async getTreeData() {
      const tableDataResult = await reqGetTreeTableDatas(this.treeChildrenName,this.pageNo,this.pageSize);
      if (tableDataResult.data.code == 200) {
        this.treeTableData = tableDataResult.data.data;
        this.treeTableData.forEach(item => {
          this.$set(item, "checked", false);
        });
        this.total = this.treeTableData.length > 0 ? this.treeTableData[0].tol : 0;
      }
    },

    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    // 选择表格数据----单选
    selectOneRow(row) {
      this.treeTableData.forEach(item => {
        item.checked = false;
      });
      row.checked = true;
    },
    // 课程设置弹窗的确定按钮点击事件
    saveTreeTableDataId() {
      const obj = this.treeTableData.find(item => {
        return item.checked == true;
      });
      this.addCourseList.kcbh = obj.courseName;
      this.addCourseList.kcid = obj.id;
      this.showDialogVisible = false;
      // this.$message({ type: "success", message: "保存成功" });
    },
    // 批量删除
    handleSelectionChange(section) {
      const arr = [];
      section.forEach(item => {
        arr.push(item.id);
      });
      this.removeAllIds = arr.join(",");
    },
    deleteOk(){
      if (this.removeAllIds != "") {
        this.$confirm('确认要删除吗？')
        .then(_ => {
          this.removeAll()
        })
      } else {
        this.$message.error("请选择批量删除的数据！");
      }
    },
    async removeAll() {
      const result = await reqDeleteCourse(this.removeAllIds);
      if (result.data.code == 200) {
        this.$message.success("删除成功！")
        if (this.tableData.length == 1) {
          this.getAwardCoursesList(
            (this.pageNo =
              this.tableData.length > 1 ? this.pageNo - 1 : this.pageNo)
          );
        } else {
          this.getAwardCoursesList(
            (this.pageNo =
              this.tableData.length > 1 ? this.pageNo : this.pageNo - 1)
          );
        }
      }else{
        this.$message.error("删除失败！")
      }
    }
  },
  mounted() {}
};
</script>
<style lang="less" scoped>
.search-button {
  vertical-align: middle;
  display: inline-block;
  cursor: pointer;
  width: 78px;
  height: 27px;
  background: #f1f8fe;
  border: 1px solid #51aef6;
  opacity: 1;
  border-radius: 6px;
  padding: 2px 9px;

  > img {
    width: 20px;
    height: 20px;
    vertical-align: -4px;
    margin-right: 5px;
  }

  > span {
    font-size: 16px;
    font-weight: 400;
    color: #51aef6;
  }
}
/deep/.button-group {
  cursor: pointer;
  margin-top: 50px;
  text-align: center;

    > div {
      display: inline-block;
      font-size: 18px;
      padding: 6px 22px;
      border-radius: 6px;

      &:nth-child(1) {
        color: #f3b815;
        border: 1px solid #f3b815;
        background: #fff6ef;
        margin-right: 139px;
      }

      &:nth-child(2) {
        color: #ff3819;
        border: 1px solid #ff3819;
        background: #ffefef;
      }
    }
  }
.manual-entry-container {
  .el-dialog__body {
    > div {
      width: 900px;
      border: 1px solid rgba(0, 76, 167, 0.8);
      border-radius: 6px;
      margin: 0 auto;

      > div {
        border-bottom: 1px solid rgba(0, 76, 167, 0.39);

        &:last-child {
          border-bottom: none;
        }

        > div {
          display: flex;

          > div {
            height: 96px;
            display: flex;
            align-items: center;
            justify-content: center;

            &:nth-child(1) {
              width: 80%;

              text-align: center;
              font-size: 16px;
              font-weight: bold;
              color: #004ca7;
            }

            &:nth-child(1) {
              height: 100px;
            }
            > span {
              color: #fa5339;
              padding: 0 3px;
            }
          }
        }
      }
    }
  }

  .el-dialog__footer {
    padding-bottom: 43px;
  }

  .dialog-footer {
    > button {
      width: 95px;
      height: 36px;
      background: #fff6ef;
      border: 1px solid #f3b815;
      border-radius: 6px;
      background: rgba(255, 246, 239, 1);
      font-size: 18px;
      color: #f3b815;
    }
  }
}
.courseSetDialog .el-dialog__body {
  display: flex;
  justify-content: space-around;
}
.courseSetDialog .el-dialog__body > .el-tree {
  width: 165px;
  border: 0 none;
}
.courseSetDialog .el-dialog__body > .el-tree > div {
  border: 0 none;
}
.courseSetDialog .el-dialog__body > .el-tree > div > div > div:nth-child(1) {
  width: auto;
  height: auto;
  font-weight: 100;
  // color: ;
}
.courseSetDialog .el-dialog__body > .el-tree > div > div > div {
  display: block;
  height: auto;
}
.assessment-container {
  width: 100% !important;
  .export-report-container {
    .el-dialog__body {
      padding: 64px 0 64px 50px;

      .el-radio {
        margin-right: 79px;
      }
    }

    .el-dialog__footer {
      padding-bottom: 103px;
    }
  }
  .block {
    .el-pagination {
      /* width: 476px;
    margin-right: -58px; */

      //margin: 0 auto;
    }
  }
  .import-report-container {
    .el-dialog__body {
      padding-left: 165px;
      padding-top: 71px;
      padding-bottom: 60px;

      > div {
        > span {
          font-size: 18px;
          font-weight: bold;
          line-height: 20px;
          color: #004ca7;
          vertical-align: middle;
        }

        > input {
          width: 254px;
          height: 25px;
          border: 1px solid #004ca7;
          opacity: 1;
          border-radius: 4px;
          padding-left: 5px;
          margin-right: 8px;
          color: #004ca7;
          vertical-align: middle;
        }

        > div {
          display: inline-block;
          font-size: 18px;
          padding: 1px 10px;
          border-radius: 4px;
          vertical-align: middle;
          cursor: pointer;

          &:nth-child(3) {
            color: rgba(2, 200, 108, 1);
            background: #f1fff8;
            border: 1px solid #02c86c;
            position: relative;
            margin-right: 20px;

            > input {
              width: 822px;
              position: absolute;
              left: -767px;

              cursor: pointer;
            }
          }

          &:nth-child(4) {
            color: rgba(82, 48, 233, 1);
            background: rgba(235, 230, 255, 1);
            border: 1px solid rgba(82, 48, 233, 1);
          }
        }
      }
    }

    .el-dialog__footer {
      padding-bottom: 76px;

      .green {
        padding: 1px 17px;
      }
      .red {
        border: 1px solid #ff3819;
        color: #ff3819;
        background: #ffefef;
      }
    }
  }
}

.plan-entry-table-container {
  margin-top: 15px;
  width: 100%;
  margin: 0 auto;
  .el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }

  .el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  .el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }

  .el-checkbox__inner:hover {
    border-color: #004ca7;
  }

  .el-checkbox__inner {
    border: 1px solid #004ca7;
    border-radius: 0;
  }

  .el-checkbox__input.is-checked .el-checkbox__inner,
  .el-checkbox__input.is-indeterminate .el-checkbox__inner {
    background-color: #004ca7;
    border-color: #004ca7;
  }

  .el-checkbox__input.is-checked + .el-checkbox__label {
    color: #004ca7;
  }

  .el-checkbox.is-bordered.is-checked {
    border-color: #004ca7;
  }

  .el-checkbox__input.is-focus .el-checkbox__inner {
    border-color: #004ca7;
  }

  .export-button {
    /* background: #fff6ef;
    border: 1px solid #f3b815;
    width: auto;
    height: 28px;
    line-height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    box-sizing: border-box; */

    > span {
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #f3b815;
    }

    > img {
      width: 16px;
      height: 16px;
      margin-right: 5px;
    }
  }

  .lucj-import-button {
    .export-button;
    width: 116px;
    margin: 0 auto 12px;
    background: #f1fff8;
    border: 1px solid #02c86c;

    &:last-child {
      margin-bottom: 0px;
    }

    > span {
      color: #02c86c;
    }
  }

  .lucj-expot-button {
    .export-button;
    background: #fff6ef;
    border: 1px solid #f3b815;
    width: 81px;
    margin: 0 auto 12px;

    &:last-child {
      margin-bottom: 0px;
    }

    > span {
      color: #f3b815;
    }
  }
}
.plsc-button {
  height: 28px;
  background: #ffefef;
  border: 1px solid #fa5339;
  border-radius: 6px;
  color: #ff3819;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  img {
    width: 17px;
    height: 17px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    margin-right: 5px;
  }
}
.cjrc-button {
  height: 28px;
  background: #efebff;
  border: 1px solid #5230e9;
  border-radius: 6px;
  color: #5230e9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  img {
    width: 17px;
    height: 17px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    margin-right: 5px;
  }
}
</style>

<style lang="less" scoped>
@import "../../../styles/print-entry.less";
.de-lucj-import-button{
  cursor: pointer;
  width: 70px;
  border-radius: 6px;
  display: inline-block;
  background: #ffffff;
  border: none;
  background: #ffefef;
  border: 1px solid #ff3819;
  box-sizing: border-box;
  color: #ff3819;
  margin-left: 10px;
  img {
      width: 14px;
      height: 14px;
      background-size: 100% 100%;
      background-repeat: no-repeat;
    }
}

  .bk-lucj-import-button {
    cursor: pointer;
    width: 70px;
    display: inline-block;
    background: #ffffff;
    border-radius: 6px;
    border: none;
    background: #f1fff8;
    border: 1px solid #02c86c;
    box-sizing: border-box;
    color: #02c86c;
    img {
      width: 14px;
      height: 14px;
      background-size: 100% 100%;
      background-repeat: no-repeat;
    }
  }
.cjrc-button {
  height: 28px;
  background: #fff6ef;
  border: 1px solid #f86900;
  border-radius: 6px;
  color: #f86900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  img {
    width: 17px;
    height: 17px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    margin-right: 5px;
  }
}
/deep/.el-table th,
.el-table tr {
  background-color: #edf2f9 !important;
}

.plan-entry-table-container {
  margin-top: 15px;

  .table-data {
    width: 100%;
    border: 0.8px solid #004ca7;
    border-radius: 9px;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #004ca7;
  }
}
.el-icon-circle-plus-outline:before {
  padding-right: 5px;
}
.el-button {
  padding: 10px 12px;
}
// .el-button--success {
//   border-color: #02c86c;
//   background: #f1fff8;
//   color: #02c86c;
// }
// .el-button--danger {
//   border: 1px solid #fa5339;
//   background: #ffefef;
//   color: #ff3819;
// }
// .el-button--primary {
//   border: 1px solid #51aef6;
//   background: #f1f8fe;
//   color: #51aef6;
// }
.manual-entry-container .dialog-footer > .red {
  border: 1px solid #fa5339;
  background: #ffefef;
  color: #ff3819;
  margin-left: 10px;
}
// /deep/.el-input__inner {
//   height: 28px;
//   line-height: 28px;
// }
/deep/.el-date-editor .el-input__prefix {
  right: 10px;
  top: -3px;
}
/deep/.el-date-editor .el-input__icon{
  line-height: 38px;
}
/deep/.el-dialog__body .el-date-editor .el-input__prefix {
  right: 10px;
  top: 3px;
}
/deep/.form_dialog .el-table--border td,
/deep/.el-dialog__wrapper .el-table--border th,
/deep/.el-dialog__wrapper .el-table--border td {
  border-right: 1px solid #c7d7eb;
  color: #004ca7;
}
@fontFamily:"Microsoft YaHei";
.xpaas-table-class {
  border: 1px solid #004ca7;
  border-radius: 9px;
  > ::v-deep div.el-table__header-wrapper {
    > table.el-table__header {
      > thead {
        > tr.xpaas-header-row-class {
          padding: 0;
          height: 76px;
          background-color: #edf2f9;
          font-size: 16px;
          font-family: Microsoft YaHei;
          font-weight: bold;
          line-height: 20px;
          color: #004ca7;
          > th.xpaas-header-cell-class {
            font-weight: bold;
            border-right: 1px solid #c7d7eb;
            border-left: 0;
            border-bottom: 1px solid #c7d7eb;
            background-color: #edf2f9;
            > div.cell {
              font-size: 16px;
              font-weight: bold;
              font-family: @fontFamily;
              color: #004ca7;
            }
          }
        }
      }
    }
  }
  > ::v-deep div.el-table__body-wrapper {
    > table.el-table__body {
      > tbody {
        > tr.xpaas-row-class {
          > td.xpaas-header-cell-class {
            border-right: 1px solid #c7d7eb;
            border-left: 0;
            border-bottom: 1px solid #c7d7eb;
            background-color: #edf2f9;
            > div.cell {
              font-size: 16px;
              font-weight: bold;
              font-family: @fontFamily;
              color: #004ca7;
            }
          }
          > td.xpaas-cell-class {
            height: 76px;

            border-right: 1px solid #c7d7eb;
            border-left: 0;
            border-bottom: 1px solid #c7d7eb;
            > div.cell {
              font-weight: normal;
              font-family: @fontFamily;
              color: #004ca7;
            }
          }
        }
      }
    }
  }
}
</style>
